package com.zmn.oms.common.constant;

/**
 * 类描述：redis分布式锁常量
 * @author heciqi
 * @date 2021/4/27 17:45
 */
public class LockConsts {
    /**
     * redis分布式锁 保存时间 单位秒
     */
    public final static int LOCK_VALID_TIME = 15;

    /**
     * 自动派单锁
     */
    public final static String LOCK_AUTO_DISTRIBUTE = "oms:lock:autodistribute:workId:%s";

    /**
     * 分布式锁
     */
    public static final String REDIS_LOCK_KEY_PRODUCT_EXTEND_FORMAT = "oms:lock:product:extend:%s";

    /**
     * 订单退款锁
     */
    public final static String LOCK_ORDER_REFUND_FORMAT = "oms:lock:orderrefund:workId:%s";

    /**
     * 优惠更新锁
     */
    public final static String LOCK_ORDER_DISCOUNT_SELLAMOUNT = "oms:lock:discount:sellamount:orderId:%s";

    /**
     * 完成订单锁
     */
    public final static String LOCK_ORDER_COMPLETE_PAY = "oms:lock:complete:workId:%s";

    /**
     * 金额锁
     */
    public final static String LOCK_ORDER_AMOUNT = "oms:lock:orderamount:orderId:%s";

    /**
     * 订单取消锁
     */
    public final static String LOCK_ORDER_CANCEL_FORMAT = "oms:lock:ordercancel:workId:%s";

    /**
     * 订单附件锁
     */
    public final static String LOCK_ORDER_ATTACHMENT = "oms:lock:attachment:orderId:%s";

    /**
     * 有数上报锁
     */
    public final static String LOCK_ORDER_YOUSHU = "oms:lock:youshu:orderId:%s_%s";

    /**
     * 改派求助领单锁
     */
    public final static String LOCK_ORDER_REDISTRIBUTE_HELP_TAKE = "oms:lock:redistribute:helptake:redistributeId:%s";

    /**
     * 核配件锁
     */
    public final static String LOCK_ORDER_SAVE_PART = "oms:lock:savepart:orderId:%s_%s";

    /**
     * 修改报价锁
     */
    public final static String LOCK_ORDER_UPDATE_QUOTATION = "oms:lock:quotation:update:%s_%s";
}
